[lua] Assault exit event bug fix and event skipped#10526
Conversation
| member:setCharVar('assaultEntered', 0) | ||
| member:setCharVar('Assault_Armband', 0) | ||
| member:startEvent(102) | ||
| if member:getID() ~= player:getID() and member:isInEvent() then |
There was a problem hiding this comment.
if member:getID() ~= player:getID()
I dont understand this check
There was a problem hiding this comment.
At this point, the player is wrapping up the Rune of Release event. The exit event (102) will fire automatically after the Rune of Release event ends a fraction of a second later. If I don't have this check, the player who triggered the Rune of Release gets an "Event Skipped." text.
I attached a screenshot of what it looks like on LSB without that check.
There was a problem hiding this comment.
I can add a comment explaining it.
There was a problem hiding this comment.
Added comment and adjusted timer to 1.
Timer of 1 throws a harmless map warning.
[map][warn] Invalid GP_CLI_COMMAND_EVENTEND packet from Test: Event ID mismatch 102 != 100. (anonymous-namespace'::ValidatedPacketHandler:220) Timer of 500 throws another harmless map warning. [map][warn] Invalid GP_CLI_COMMAND_EVENTEND packet from Test: Not in an event. (anonymous-namespace'::ValidatedPacketHandler:220)
5d69e7a to
84a868c
Compare
84a868c to
04752bf
Compare
|
Quick look at the capture shows the following exchange sync 4251 at 22:52:26.761 EVENTUCOFF sent to client with Mode 25602 (telling it to cancel event 100) It's not really a 2s delay, it's the server waiting for the acknowledgment of the event being cancelled client side before sending the expel. I need a little time to think through it. |
I affirm:
What does this pull request do?
The way I implemented this is a :release() then a 2 second wait until the exit event to mimic the retail delay. If I didn't have that 2 second wait, the exit event never fires and you are stuck in the assault. With this implementation, technically, the player can spam "enter" to re-enter the event. I think a future PR will also need to freeze or lock the player during all of this.
Video of ending Assault while in an event: https://youtu.be/-1ZAWkKUkQc
Video of Event Skipped: https://youtu.be/YHvsnZkPV50
Steps to test these changes
Go into one of the new assaults, beat it, sit at the rune of release until the timer runs out in that event.